package com.wq.payunion.oauth2.useroauth2.model;

import java.util.HashMap;
import java.util.Map;

/**
 * @Author: wangqiang20995
 * @Date:2018 年 9 月 15 日 0015
 * @Description:
 * @Resource:
 */
public class OAuthResult {

    public enum AuthStatus {
        AUTHORIZATION_CODE(0),
        AUTHORIZATION_ACCESS_TOKEN(1),
        AUTHORIZATION_EXTRACT_INFO(2);

        private Integer status;

        AuthStatus(int status){
            this.status = status;
        }
    }

    private String uuid;

    private AuthStatus authStatus;

    private Map<String,Object> response;

    private boolean successFlag;

    private String callInfo;

    @Override
    public String toString() {
        return "OAuthResult{" +
                "uuid='" + uuid + '\'' +
                ", authStatus=" + authStatus +
                ", response=" + response +
                ", successFlag=" + successFlag +
                ", callInfo='" + callInfo + '\'' +
                '}';
    }

    public String getCallInfo() {
        return callInfo;
    }

    public void setCallInfo(String callInfo) {
        this.callInfo = callInfo;
    }

    public String getUuid() {
        return uuid;
    }

    public void setUuid(String uuid) {
        this.uuid = uuid;
    }

    public AuthStatus getAuthStatus() {
        return authStatus;
    }

    public void setAuthStatus(AuthStatus authStatus) {
        this.authStatus = authStatus;
    }

    public Map<String, Object> getResponse() {
        return response;
    }

    public boolean isSuccessFlag() {
        return successFlag;
    }

    public void setSuccessFlag(boolean successFlag) {
        this.successFlag = successFlag;
    }

    public void setResponse(String key, Object value){
        this.response.put(key,value);
    }

    public OAuthResult(){
        this.response = new HashMap<>();
    }

    public void setResponse(Map<String,Object> map){
        this.response = map;
    }
}


